package cn.ywsj.ywsjmidtier.controller;

import cn.ywsj.ywsjmidtier.entity.VO.AdSiteQueryVo;
import cn.ywsj.ywsjmidtier.service.ViewAdvertisementFeign;
import cn.ywsj.ywsjmidtier.utils.JsonObjectUtil;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName : ViewAdvertisementController
 * @Author : Lenovo
 * @Date: 2021/7/23 16:46
 * @Description :
 */
@RestController
@RequestMapping("/view/adver")
public class ViewAdvertisementController {
    @Autowired
    private ViewAdvertisementFeign viewAdvertisementFeign;
    @GetMapping("/queryadvbyadcode")
    public String queryAdvByAdCode(AdSiteQueryVo adSiteQueryVo){
        JSONObject jsonObject = JsonObjectUtil.ObjectToJson(adSiteQueryVo);
        return viewAdvertisementFeign.queryAdvByAdCode(jsonObject);
    }
}
